package bbs.entity.enums;

public enum EditTypeEnum {

    RICH(0, "富文本"),
    MARKDOWN(1, "markdown");

    private Integer type;
    private String desc;

    private EditTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }
    public Integer getType() {
        return type;
    }
    public String getDesc() {
        return desc;
    }
    public static EditTypeEnum getEnum(Integer type) {
        for (EditTypeEnum e : EditTypeEnum.values()) {
            if (e.getType().equals(type)) {
                return e;
            }
        }
        return null;
    }
}
